<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.1.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","width":300,"display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="本篇介绍如何通过war包的方式安装Jenkins并实现生产级别的SpringBoot项目一键部署。">
<meta property="og:type" content="article">
<meta property="og:title" content="War方式安装Jenkins并实现SpringBoot项目一键部署">
<meta property="og:url" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/index.html">
<meta property="og:site_name" content="履歴の本文">
<meta property="og:description" content="本篇介绍如何通过war包的方式安装Jenkins并实现生产级别的SpringBoot项目一键部署。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/000.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/001.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/003.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/004.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/005.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/006.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/007.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/008.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/009.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/010.png">
<meta property="og:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/011.png">
<meta property="article:published_time" content="2020-11-24T00:38:08.000Z">
<meta property="article:modified_time" content="2020-11-24T11:28:37.809Z">
<meta property="article:author" content="モンキーDルフィ">
<meta property="article:tag" content="devops">
<meta property="article:tag" content="jenkins">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/000.png">

<link rel="canonical" href="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>War方式安装Jenkins并实现SpringBoot项目一键部署 | 履歴の本文</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">履歴の本文</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">天下风云出我辈，一入代码岁月催</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签<span class="badge">15</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类<span class="badge">7</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档<span class="badge">18</span></a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/lufei.jpg">
      <meta itemprop="name" content="モンキーDルフィ">
      <meta itemprop="description" content="海贼王におれはなる！">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="履歴の本文">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          War方式安装Jenkins并实现SpringBoot项目一键部署
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-11-24 08:38:08" itemprop="dateCreated datePublished" datetime="2020-11-24T08:38:08+08:00">2020-11-24</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/jenkins/" itemprop="url" rel="index"><span itemprop="name">jenkins</span></a>
                </span>
            </span>

          
            <span id="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/" class="post-meta-item leancloud_visitors" data-flag-title="War方式安装Jenkins并实现SpringBoot项目一键部署" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="fa fa-file-word-o"></i>
              </span>
              <span>1.3k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="fa fa-clock-o"></i>
              </span>
              <span>1 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>本篇介绍如何通过war包的方式安装Jenkins并实现生产级别的SpringBoot项目一键部署。</p>
<a id="more"></a>

<h2 id="Prepare-To-Servers"><a href="#Prepare-To-Servers" class="headerlink" title="Prepare To Servers"></a>Prepare To Servers</h2><p>准备服务器三台：<br>192.168.175.100(jyinjuly)——Jenkins服务器<br>193.168.175.110(jyinjuly-app1)——应用服务器A<br>193.168.175.120(jyinjuly-app2)——应用服务器B</p>
<p>其中，Jenkins服务器安装如下环境：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># java version &quot;1.8.0_271&quot;</span></span><br><span class="line">$ java -version</span><br><span class="line"><span class="comment"># Apache Maven 3.6.3</span></span><br><span class="line">$ mvn -v</span><br><span class="line"><span class="comment"># git version 1.8.3.1</span></span><br><span class="line">$ git --version</span><br></pre></td></tr></table></figure>
<p>另外两台应用服务器只需安装Java环境：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># java version &quot;1.8.0_271&quot;</span></span><br><span class="line">$ java -version</span><br></pre></td></tr></table></figure>

<h2 id="Install-Jenkins-By-War"><a href="#Install-Jenkins-By-War" class="headerlink" title="Install Jenkins By War"></a>Install Jenkins By War</h2><p>Jenkins服务器安装Jenkins，首先下载<code>jenkins.war</code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ mkdir -p /usr/<span class="built_in">local</span>/jenkins</span><br><span class="line">$ <span class="built_in">cd</span> /usr/<span class="built_in">local</span>/jenkins</span><br><span class="line">$ wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war</span><br></pre></td></tr></table></figure>
<p>然后直接后台启动</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ nohup java -jar jenkins.war --httpPort=8080 &gt; out.log 2&gt;&amp;1 &amp;</span><br></pre></td></tr></table></figure>
<p>此时Jenkins的数据目录为<code>~/.jenkins</code></p>
<h2 id="Visis-Jenkins"><a href="#Visis-Jenkins" class="headerlink" title="Visis Jenkins"></a>Visis Jenkins</h2><p>浏览器访问Jenkins<br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/000.png" alt="000"><br>全局工具配置<br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/001.png" alt="001"><br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/003.png" alt="003"><br>系统配置（需要安装插件Publish Over SSH）<br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/004.png" alt="004"><br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/005.png" alt="005"></p>
<h2 id="Pre-work-On-App-Server"><a href="#Pre-work-On-App-Server" class="headerlink" title="Pre-work On App Server"></a>Pre-work On App Server</h2><p>在两台应用服务器上做一些前置工作，首先创建jar包的存放目录</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ mkdir -p /usr/<span class="built_in">local</span>/app</span><br></pre></td></tr></table></figure>
<p>然后在该目录下预存<code>startup.sh</code>脚本文件，内容如下：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#!/bin/bash</span></span><br><span class="line"><span class="built_in">source</span> /etc/profile</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;Begin Execute Shell&quot;</span></span><br><span class="line">pid=`ps -ef |grep java|grep <span class="variable">$&#123;APP_NAME&#125;</span>|awk <span class="string">&#x27;&#123;print $2&#125;&#x27;</span>`</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;<span class="variable">$pid</span>&quot;</span></span><br><span class="line"><span class="keyword">if</span> [ -n <span class="string">&quot;<span class="variable">$pid</span>&quot;</span> ]</span><br><span class="line"><span class="keyword">then</span></span><br><span class="line">   <span class="built_in">echo</span> <span class="string">&quot;Kill SpringBoot Application&quot;</span></span><br><span class="line">   <span class="built_in">kill</span> -9 <span class="variable">$pid</span></span><br><span class="line">   sleep 5</span><br><span class="line"><span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;Start SpringBoot Application&quot;</span></span><br><span class="line">nohup java -jar -Dspring.profiles.active=dev /usr/<span class="built_in">local</span>/app/*.jar &gt; /usr/<span class="built_in">local</span>/app/out.log 2&gt;&amp;1 &amp;</span><br></pre></td></tr></table></figure>

<h2 id="Create-Jenkins-Job"><a href="#Create-Jenkins-Job" class="headerlink" title="Create Jenkins Job"></a>Create Jenkins Job</h2><p>创建Jenkins任务<br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/006.png" alt="006"><br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/007.png" alt="007"><br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/008.png" alt="008"><br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/009.png" alt="009"></p>
<h2 id="Run-The-Task"><a href="#Run-The-Task" class="headerlink" title="Run The Task"></a>Run The Task</h2><p>任务执行日志如下：<br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/010.png" alt="010"><br>访问如下：<br><img src="/2020/11/24/War%E6%96%B9%E5%BC%8F%E5%AE%89%E8%A3%85Jenkins%E5%B9%B6%E5%AE%9E%E7%8E%B0SpringBoot%E9%A1%B9%E7%9B%AE%E4%B8%80%E9%94%AE%E9%83%A8%E7%BD%B2/011.png" alt="011"></p>

    </div>

    
    
    

      <footer class="post-footer">
          
          <div class="post-tags">
              <a href="/tags/devops/" rel="tag"><i class="fa fa-tag"></i> devops</a>
              <a href="/tags/jenkins/" rel="tag"><i class="fa fa-tag"></i> jenkins</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2020/11/20/Linux%E5%AE%9E%E7%8E%B0SSH%E5%85%8D%E5%AF%86%E7%99%BB%E5%BD%95/" rel="prev" title="Linux实现SSH免密登录">
      <i class="fa fa-chevron-left"></i> Linux实现SSH免密登录
    </a></div>
      <div class="post-nav-item"></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Prepare-To-Servers"><span class="nav-number">1.</span> <span class="nav-text">Prepare To Servers</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Install-Jenkins-By-War"><span class="nav-number">2.</span> <span class="nav-text">Install Jenkins By War</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Visis-Jenkins"><span class="nav-number">3.</span> <span class="nav-text">Visis Jenkins</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Pre-work-On-App-Server"><span class="nav-number">4.</span> <span class="nav-text">Pre-work On App Server</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Create-Jenkins-Job"><span class="nav-number">5.</span> <span class="nav-text">Create Jenkins Job</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Run-The-Task"><span class="nav-number">6.</span> <span class="nav-text">Run The Task</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="モンキーDルフィ"
      src="/images/lufei.jpg">
  <p class="site-author-name" itemprop="name">モンキーDルフィ</p>
  <div class="site-description" itemprop="description">海贼王におれはなる！</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">18</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">7</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">15</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>
      <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=174419&auto=1&height=66"></iframe>
    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">モンキーDルフィ</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    <span title="站点总字数">66k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">1:01</span>
</div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'rp9eaSA9Y6vBrWUdOf5ukLYs-gzGzoHsz',
      appKey     : 'SIkchhA5LF0xmXpXKtbkA65H',
      placeholder: "欢迎大家前来交流~",
      avatar     : '/images/lufei.jpg',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : 'zh-CN' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
